//
//  DeviceSafetyViewController.m
//  WBBaseProject
//
//  Created by 吴斌 on 2018/3/13.
//  Copyright © 2018年 吴斌. All rights reserved.
//

#import "DeviceSafetyViewController.h"
#import "InputView.h"
#import "VerificationCodeView.h"
@interface DeviceSafetyViewController ()

@end

@implementation DeviceSafetyViewController

#pragma mark - 生命周期 Life Circle
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"设备安全验证";
    [self setupUI];
}

- (void)setupUI
{
    UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - kNavigationBarHeight)];
    scrollView.contentSize = CGSizeMake(kScreenWidth, kScreenHeight - kNavigationBarHeight + 1);
    scrollView.bounces = YES;
    scrollView.backgroundColor = WB_RGBColor(240, 240, 240);
    [self.view addSubview:scrollView];
    
    UILabel *tipLb = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, kScreenWidth - 15, 30)];
    tipLb.text = @"为确保您的账户安全，请验证您的手机号码";
    tipLb.font = [UIFont systemFontOfSize:12];
    tipLb.textColor = WB_RGBColor(128, 128, 128);
    [scrollView addSubview:tipLb];
    
    InputView *view1 = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([InputView class])  owner:self options:nil].firstObject;
    view1.titleLb.text = @"手机号码";
    view1.inputTF.text = @"18067909877";
    view1.inputTF.enabled = NO;
    view1.frame = CGRectMake(0, 30, kScreenWidth, kRowHeight);
    //    _branchTF = view3.inputTF;
    [scrollView addSubview:view1];
    
    VerificationCodeView *view2 = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([VerificationCodeView class])  owner:self options:nil].firstObject;
    view2.frame = CGRectMake(0, 30 + kRowHeight, kScreenWidth, kRowHeight);
    //    _branchTF = view3.inputTF;
    [scrollView addSubview:view2];
    
    UIButton *sureBtn = [Factory customButtonWithTitle:@"确定发布"];
    sureBtn.frame = CGRectMake(55, 35 + CGRectGetMaxY(view2.frame), kScreenWidth - 110, 50);
    [sureBtn addTarget:self action:@selector(sureClick:) forControlEvents:UIControlEventTouchUpInside];
    [scrollView addSubview:sureBtn];
}

- (void)sureClick:(UIButton *)sender
{
    
}
@end
